Artificial Intelligence and Infectious Keratitis: Where Are We Now?

Infectious keratitis (IK), which is one of the most common and catastrophic ophthalmic emergencies, accounts for the leading cause of corneal blindness worldwide. Different pathogens, including bacteria, viruses, fungi, and parasites, can cause IK. The diagnosis and etiology detection of IK pose specific challenges, and delayed or incorrect diagnosis can significantly worsen the outcome. Currently, this process is mainly performed based on slit–lamp findings, corneal smear and culture, tissue biopsy, PCR, and confocal microscopy. However, these diagnostic methods have their drawbacks, including experience dependency, tissue damage, cost, and time consumption. Diagnosis and etiology detection of IK can be especially challenging in rural areas or in countries with limited resources. In recent years, artificial intelligence (AI) has opened new windows in medical fields such as ophthalmology. An increasing number of studies have utilized AI in the diagnosis of anterior segment diseases such as IK. Several studies have demonstrated that AI algorithms can diagnose and detect the etiology of IK accurately and fast, which can be valuable, especially in remote areas and in countries with limited resources. Herein, we provided a comprehensive update on the utility of AI in IK.


Introduction
Infectious keratitis (IK) refers to a corneal infection.These infections can culminate in severe visual impairment or even permanent loss if not identified and treated in a timely manner.IK is the predominant etiology of corneal opacification and ranks fifth among the causes of blindness in developed and developing countries.It is responsible for 1.5-2.0 million new cases of monocular blindness annually worldwide [1].The estimated incidence of infectious corneal blindness ranges from 2.5 to 799 per 100,000 populationyears.In detail, 2.5-27.6,2.6-40.3,and 6.6 per 100,000 population-years have been reported for the US, UK, and Australia, respectively, while undeveloped areas such as South India and Nepal experience rates of 113 and 799 per 100,000 population-years, respectively [2].Contributing risk factors for IK include contact lens usage, ocular trauma, corneal diseases, lid abnormalities, and previous ocular surgeries [3].In countries with advanced healthcare systems, there has been a recent increase in reported cases of IK due to the growing popularity of contact lenses.In the United States, the reported incidence rate is 2.5 per 100,000 individuals for non-contact lens wearers compared to 130.4 cases per 100,000 for contact lens wearers [4].In contrast, underdeveloped countries have experienced persistent levels of IK nearly ten times as high as advanced nations such as the United States [4].
IK can be caused by a multitude of agents, including bacteria, viruses, fungi, and parasites (Figure 1).The primary characteristic of IK is the presence of a corneal infiltrate, an area of white/yellow corneal haze or opacity with a layer of damaged epithelium [5].However, these characteristics may vary between different etiologies and, notably, different microorganisms may occasionally manifest with specific presentations.Currently, the diagnosis of IK and subsequent identification of etiology are mainly made based on slit-lamp findings, corneal smear and culture, tissue biopsy, PCR, and confocal microscopy.However, these diagnostic methods have their drawbacks, including experience dependency, tissue damage, cost, and time consumption.This process can be especially challenging in rural areas or in countries with limited resources.
Life 2023, 13, x FOR PEER REVIEW 2 of 12 rate is 2.5 per 100,000 individuals for non-contact lens wearers compared to 130.4 cases per 100,000 for contact lens wearers [4].In contrast, underdeveloped countries have experienced persistent levels of IK nearly ten times as high as advanced nations such as the United States [4].IK can be caused by a multitude of agents, including bacteria, viruses, fungi, and parasites (Figure 1).The primary characteristic of IK is the presence of a corneal infiltrate, an area of white/yellow corneal haze or opacity with a layer of damaged epithelium [5].However, these characteristics may vary between different etiologies and, notably, different microorganisms may occasionally manifest with specific presentations.Currently, the diagnosis of IK and subsequent identification of etiology are mainly made based on slitlamp findings, corneal smear and culture, tissue biopsy, PCR, and confocal microscopy.However, these diagnostic methods have their drawbacks, including experience dependency, tissue damage, cost, and time consumption.This process can be especially challenging in rural areas or in countries with limited resources.A subfield of computer science known as artificial intelligence (AI) consists of research and development of new technical fields that simulate and advance human intelligence theory, methods, and application systems [6].AI subclassifications include machine learning (ML), deep learning (DL), artificial neural networks (ANNs), deep neural networks (DNNs), convolution neural networks (CNNs), and transfer learning [7].The utilization of AI can significantly benefit society and the healthcare system, given that the diagnosis of ocular conditions heavily relies on the experience of highly trained ophthalmologists whose distribution varies significantly across geographic areas [8,9].Additionally, given the widespread use of imaging tools in clinical practice and the consequent availability of codified data from imaging to numeric clinical parameters, the ophthalmic community is positioned well to develop AI strategies [10].The first ophthalmic AI device to automatically diagnose and grade diabetic retinopathy, IDx-DR, was approved by the U.S. Food and Drug Administration in 2018 [11].Previously, ocular AI research was mainly focused on diseases of the posterior segment, such as diabetic retinopathy, retinopathy of prematurity, age-related macular degeneration, retinal vein occlusion, and glaucoma optic neuropathy [11][12][13][14][15].However, an increasing number of studies have utilized AI in the diagnosis of anterior segment diseases such as IK [16][17][18].Incorporating AI A subfield of computer science known as artificial intelligence (AI) consists of research and development of new technical fields that simulate and advance human intelligence theory, methods, and application systems [6].AI subclassifications include machine learning (ML), deep learning (DL), artificial neural networks (ANNs), deep neural networks (DNNs), convolution neural networks (CNNs), and transfer learning [7].The utilization of AI can significantly benefit society and the healthcare system, given that the diagnosis of ocular conditions heavily relies on the experience of highly trained ophthalmologists whose distribution varies significantly across geographic areas [8,9].Additionally, given the widespread use of imaging tools in clinical practice and the consequent availability of codified data from imaging to numeric clinical parameters, the ophthalmic community is positioned well to develop AI strategies [10].The first ophthalmic AI device to automatically diagnose and grade diabetic retinopathy, IDx-DR, was approved by the U.S. Food and Drug Administration in 2018 [11].Previously, ocular AI research was mainly focused on diseases of the posterior segment, such as diabetic retinopathy, retinopathy of prematurity, age-related macular degeneration, retinal vein occlusion, and glaucoma optic neuropathy [11][12][13][14][15].However, an increasing number of studies have utilized AI in the diagnosis of anterior segment diseases such as IK [16][17][18].Incorporating AI into the diagnosis, etiology detection, and management of IK can provide a cutting-edge solution to the shortage of ophthalmologists and improve patient care and outcomes.AI algorithms can be trained to recognize patterns in images of the eye that are invisible to the naked eye, which allows AI algorithms to diagnose IK and determine etiology with a high degree of accuracy.Several studies have demonstrated that AI algorithms can diagnose IK from slit-lamp images with similar accuracy as human experts [19].AI algorithms have also been trained to diagnose fungal keratitis from confocal microscopy images with satisfactory diagnostic performance [20].These studies suggest that AI has the potential to be a valuable tool for the diagnosis of IK and etiology detection, especially in remote areas and in countries with limited resources.Herein, we provide a comprehensive update on the utility of AI in IK.Since this technology can be utilized in numerous ways, we have classified the models into diagnostic and discriminative models, which target primary healthcare practitioners and specialists such as ophthalmologists, respectively.

Methodology
The English-language literature published from January 2002 to June 2023 on PubMed/ Medline, ISI Web of Knowledge, ScienceDirect, Scopus, and Google Scholar databases was searched using the following keywords: "keratitis" OR "infectious keratitis" OR "corneal infection" OR "corneal ulcer" AND "artificial intelligence", OR "AI" OR "deep learning", OR "machine learning", OR "neural network".The extracted articles were first reviewed by title and abstract, followed by the examination of full texts of eligible articles and their corresponding reference list.Non-English articles, preprints, and computational simulations were excluded.

Historical Point of View
Historically, the first attempted application of AI in the diagnosis of IK utilized an artificial neural network (ANN), which incorporated three categories of information as inputs: (1) ocular predisposing factors (such as trauma, contact lens wear, lid and lacrimal diseases, and steroid usage), ( 2) systemic risk factors (such as diabetes, alcoholism, and immune deficiency disorders), and (3) ulcer features (such as size, depth, and location) [21].In this study by Saini et al. in 2003, the trained model could correctly classify all sixty-three corneal ulcers in the training set.In the test set, their model correctly classified 39 out of 43 corneal ulcers.Specificity for bacterial and fungal categories was 76.47% and 100%, respectively.Additionally, the accuracy of classification was 90.7%, which was significantly better than the clinicians' average accuracy of 62.8%.Although imaging was not used in this study, the trained model demonstrated significant potential in accurately classifying of corneal ulcers based on forty input variables from each case.In later studies, AI was used to process and classify images.Initially, slit-lamp or other imaging modalities were used, and AI could only confirm or rule out keratitis.However, this was still a valuable tool for quick diagnosis with a comparable accuracy to ophthalmologists.Later iterations incorporated the ability to image corneal layers in 3D using a confocal microscope.Currently, most projects are using advanced AI models to not only diagnose but even discriminate between types of IK.

Diagnostic Models
As technology progressed, AI gradually began interpreting images in detail.Loo et al. developed a fully automatic algorithm for the segmentation of ocular structures and biomarkers of IK on slit-lamp photographs under two different illuminations [22].Their algorithm was able to identify stromal infiltration, hypopyon, WBCs, and edema on diffuse white-light images and epithelial defects, corneal limbus, and light reflexes on diffuse blue-light images with fluorescein staining.The Dice similarity coefficient (DSC) of the algorithm compared to a physician in this study was 0.95, a highly favorable result for AI.The researchers made their datasets and algorithms freely available as an opensource software package to promote the future development of automatic algorithms for determining the diagnosis and prognosis of infectious diseases of the cornea.
In one study on fungal keratitis, Li et al. assessed the impact of the segmentation method (e.g., manual or automated) on diagnostic accuracy and speed [23].They hypothesized that combining manual and automated segmentation methods may yield greater efficiency.They found that automated segmentation is more accurate than manual segmentation.However, manual segmentation shows faster performance compared to automated segmentation.
In an interesting multi-center report, the differentiation between active corneal ulcers and healed scars was studied [24].The trained model was tested on two different patient populations from eye clinics in India (n = 200) and the Byers Eye Institute at Stanford University (n = 101).The results were promising: 115/123 active ulcers and 65/77 scars from the Indian population and 43/55 active ulcers and 42/46 scars from the Northern California population were correctly diagnosed.
Kuo et al. [25] developed a deep learning model to diagnose fungal keratitis cases from corneal photography.The results were compared with opinions of three experienced cornea specialists (with at least 7 years of qualification in the specialty) and three noncornea specialty ophthalmologists with comparable qualifications in clinical practice.Their model showed an average of around 70% accuracy, which was higher than the non-cornea specialty ophthalmologists but lower than the cornea specialists.Hence, such models can be logically applied in rural areas where highly specialized medical personnel are not readily available.
Comparing the performance of different deep learning models in the detection of bacterial keratitis from corneal photographs was the subject of another study by Kuo et al. [26].EfficientNet and non-EfficientNet models were assessed in this study.The results showed that all models have a comparable accuracy.However, non-EfficientNet models showed a higher sensitivity (79-82% and 50-55% of sensitivity and specificity, respectively), and EfficientNet models had a higher specificity (73-74% and 60-64% of sensitivity and specificity, respectively).Overall, all deep learning models had a higher sensitivity but lower specificity in the diagnosis of bacterial keratitis compared to ophthalmologists.
Wei et al. [27] conducted a large study regarding the diagnosis of fungal keratitis.They mixed manual recognition and machine learning systems in a multi-center study with promising results.
Natarajan and colleagues [28] conducted one of the limited number of studies regarding viral keratitis.A total of 307 slit-lamp images from 285 eyes were included.Out of these, 177 images were from patients with necrotizing HSV keratitis, and the remaining 130 images belonged to patients with bacterial and fungal keratitis.A rate of 72%, 69.6%, and 76.5% were reported for the accuracy, sensitivity, and specificity of the model, respectively.
Alongside qualitative analysis, AI seems to have the potential to provide quantitative analytics.Although diagnosis and classification are the common subjects of AI studies in the field of IK, assessing the severity of the disease can be another interesting target.In line with this concept, Alquran et al. [29] used a model to evaluate various parameters, including ulcer pattern (point-like, point-flaky, flaky), type (no ulcer, micro punctate, macro punctate, coalescent macro punctate, and patch ≥ 1 mm), and grade (from grade 0 or no ulcer to grade 4 or central optical zone involvement) in fluorescein staining images.

Discriminative Models
As AI algorithms and diagnostic efficacy began improving, new studies were performed to identify whether the models could distinguish between the various microbial etiologies of IK.Fungal keratitis is notoriously difficult to distinguish from bacterial keratitis in clinical practice.In a study by Hung and colleagues [30], a deep learning algorithm was applied to differentiate between slit-lamp photos of bacterial and fungal keratitis.They achieved an average accuracy of approximately 80%, surpassing general ophthalmologists and comparable to cornea specialists.In detail, the accuracy rate for bacterial and fungal keratitis ranged from 79.6% to 95.9% and 26.3% to 65.8%, respectively.
Another study by Ghosh et al. [31] aimed to differentiate between fungal and bacterial keratitis as well, and their algorithm showed an accuracy of 83% in this regard.They found that image brightness plays a significant role in the correct classification of fungal keratitis.
One study by Won et al. [32] developed a deep learning algorithm that was strengthened with two modules in order to discriminate between bacterial and fungal keratitis.Notably, adding the two mentioned modules could significantly increase the accuracy of the algorithm from 81.1% to 87.8%.
Combining different types of AI models may improve diagnostic performance.In a large study by Zhang and colleagues [33], 1490, 1670, 600, and 1070 patients with bacterial, fungal, herpes simplex virus (HSV), and Acanthamoeba keratitis were enrolled, respectively.Different combinations of models were tested, and the highest accuracy was 77.08%.Bacterial, fungal, Acanthamoeba, and HSV keratitis were diagnosed with an accuracy of 70.27%, 77.71%, 83.81%, and 79.31%, respectively.Interestingly, AI's accuracy for each subtype of keratitis exceeded that of three invited cornea specialists.In contrast, Kuo et al. [34] stated that although ensemble models can enhance performance, the effect seems to be limited.They introduced a deep learning model to distinguish Pseudomonas keratitis from non-Pseudomonas bacterial keratitis.Various algorithms were used as the backbone, and 71.2% was the highest reported accuracy.However, the best ensemble model showed an accuracy of 72.1%, which was not a statistically significant difference.
Moreover, in a study by Hu and colleagues [35], six deep learning algorithms were tested and compared with the performance of two ophthalmologists.Out of these, the best algorithm showed an accuracy and a specificity of 73.5% and 90.4%, respectively, in differentiating between different keratitis types.
Koyama et al. [36] developed a hybrid deep learning algorithm to identify the causative pathogen from slit-lamp images.One of the novel aspects of their work was applying facial recognition techniques to provide the ability to analyze images from different angles and with different levels of illumination and degrees of resolution.The overall accuracy rate of the multiclass diagnosis was 88.0%.In detail, Acanthamoeba, bacteria, fungi, and HSV were accurately diagnosed with rates of 97.9%, 90.7%, 95.0%, and 92.3%, respectively.The algorithm showed a significantly higher performance than 35 invited board-certified ophthalmologists throughout Japan, including 16 cornea specialist faculty members.
In another study, Sajeev et al. [37] developed a deep learning approach to differentiate between bacterial and viral keratitis, which showed an acceptable performance.Also, Wang et al. [38] developed a deep learning-based model to differentiate between bacterial, fungal, and HSV keratitis.Notably, they used photographs acquired by slit-lamp and smartphones.Promising results were reported for their model.
Redd and colleagues [39] developed models for automated image-based differentiation of bacterial and fungal ulcers using images from handheld portable cameras.They proposed that telemedicine applications using less-expensive and more portable imaging methods may significantly increase the potential public health impact of this technology since lowincome countries may have limited potential for implementation of models that require slit-lamp mounted cameras.In their multi-center study, different algorithms were used to discriminate between fungal and bacterial ulcers, and the results were compared to human experts.Interestingly, their models achieved superhuman performance.Similarly, Xu et al. [40] designed a model that could greatly exceed the average level of professionals and reach the level of performance of top ophthalmologists.
Table 1 provides a summary of different slit-lamp photography-based studies.

Confocal Microscopy-Based Studies
One of the most useful imaging modalities in the diagnosis of infectious keratitis, particularly for fungi and Acanthamoeba, is in vivo confocal microscopy (IVCM).IVCM is considered a non-invasive technique that can provide high-resolution images at cellular and sub-cellular levels.Its utility is especially prominent in microbiological negative cases or deep infiltration, which blocks access from obtaining tissue for smear and culture [43].

Diagnostic Models
AI systems gradually became more complex and were trained to diagnose subtypes of keratitis utilizing confocal imaging.For example, in the diagnosis of fungal keratitis, distinguishing between nerves of a normal cornea and fungal hyphae on confocal microscopy images is a remarkable challenge, especially with a complicated background.To solve this issue, Wu et al. [44] introduced a novel automatic hyphae detection method to classify the normal and abnormal images.Hyphal density was then calculated using the ratio of hyphae length to the area as a marker for the infection severity.This method resulted in an accuracy of nearly 100% in distinguishing between normal and abnormal images.
In another successful application of AI to confocal imaging [20], a total of 535 images were tested, which showed a satisfactory performance of 515 correct diagnoses and 20 misdiagnoses (6 with fungal hyphae and 14 without).
In a hallmark study for the accurate diagnosis of fungal keratitis by Liu and colleagues [45], a novel convolutional neural network framework for the diagnosis of fungal keratitis from confocal microscopy images was introduced.They compared the accuracy of two traditional models with similar models based on mean fusion and histogram-matching fusion.Their results showed that using data augmentation and image fusion has a diagnostic accuracy of 99.95%.
Hou et al. [46] proposed a web-based medical image management and analysis system.Then, they integrated their model with a system designed to diagnose confocal microscopy images of fungal keratitis online.

Discriminative Models
In a study by Zhang and colleagues [47], they classified bacterial, fungal, and viral keratitis based on confocal microscopy images.Their results showed 75% and 70.13% of average accuracy and sensitivity, respectively.However, the sensitivity for diagnosing viral keratitis was comparatively lacking at only 16.8%.
In another study by Tang et al. [48], confocal microscopy images were used to identify pathogenic fungal genera.The results were satisfactory regarding the identification of Fusarium and Aspergillus, with an accuracy rate of 81.7% and 75.7% for the detection of the two fungi, respectively.
In another study, Essalat et al. [49] enrolled confocal microscopy images of fungal, Acanthamoeba, non-specific keratitis, and normal corneas.Their study reported sensitivity and specificity of 91.4% and 98.3% for Acanthamoeba and 97.0% and 96.4% for fungal keratitis, respectively.Notably, the authors have presented their confocal microscopykeratitis dataset openly available for future research.Table 2 provides a summary of different confocal microscopy-based studies.

What about Culture-Negative Ulcers?
In a study by Kogachi and colleagues [42], different algorithms were trained to determine whether CNNs are capable of differentiating morphological differences of slit-lamp photographs between images of culture-positive and -negative corneal ulcers.Notably, their models could not detect morphological differences between microbiologically positive and negative corneal ulcers.Hence, the authors concluded that although current models have used only microbiologically positive cases, the results are potentially generalizable even to cases with negative microbiological results [42].However, more studies are required to address this issue.

Challenges and Limitations
Some technical challenges still exist which impede the accurate diagnosis of IK and should be addressed in future studies.First, the current models are greatly dependent on image quality.Most studies have used high-quality images, but capturing high-quality images is not possible in all medical centers, and transferring the images via messaging platforms may decrease quality as well.However, there are successful models with image quality around 200 × 200 to 300 × 300 pixels.Other image-related factors which may impact diagnostic accuracy include brightness, orientation, and focus.A standard range has not yet been defined for these parameters.Hence, it can be expected that the reported performances may fluctuate in different settings.Second, pre-existing ocular pathologies such as pterygium, corneal arcus, conjuctivalization, and surgical scars can severely impact the results.Third, although mixed infections (e.g., two or more types of pathogens) are not uncommon in routine practice, none of the previous studies have studied polymicrobial variants of IK.Moreover, the depth of corneal involvement can act as a differentiating factor for etiological detection, as well as a prognostic and severity parameter, which can predict subsequent complications such as endophthalmitis.This factor is routinely noted during routine practice using slit-beam illumination, but current models mainly use diffuse-beam photos.Therefore, the depth of involvement remains unconsidered.More advanced algorithms with larger sample sizes can overcome these challenges.
Collectively, it seems that although the current models have shown promising results, a long way is still to go in applying these models in routine practice.In fact, in clinical practice, the scenarios that ophthalmologists face are more complex; patients with pre-existing pathologies, previous ocular surgeries, and mixed or negative culture cases are among these conditions, which the current models are not trained to deal with.However, as stated earlier, these technologies can be applied at different levels.So, diagnostic models, especially those enrolled in other ocular surface pathologies in their dataset, can be helpful in the screening or primary healthcare level.Hence, we should emphasize that clinical diagnosis remains a critical initial step in managing infectious keratitis, and artificial intelligence-based models would never substitute for the human brain and decision making, and their role remains at the level of auxiliary tools.

Future Directions
The field of AI is rapidly evolving, and multiple novel applications for AI in IK are being developed.As AI technology continues to progress, it is likely to play an increasingly important role in the diagnosis and management of IK.They can help to improve access to eye care and reduce the risk of blindness.Hence, besides diagnosis alone, future studies are required to focus on identifying the severity of the disease, prognosis, probability of recurrence, and treatment approach and regimen.On a related note, AI can be used to screen databases for new therapeutic treatments for IK as well.We believe that, in the near future, more advancements can revolutionize this field, such as AI-powered devices like microscopes to automatically detect and classify microorganisms in corneal smears and culture, AI-powered telemedicine assistants to provide remote consultations for patients in rural areas and in countries with limited resources, and AI-powered decision support systems to help ophthalmologists diagnose and treat IK, improving the quality of care and reducing the risk of complications from human error.

Conclusions
Infectious keratitis is a serious eye infection that can lead to blindness if not treated promptly.The diagnosis and etiology detection of infectious keratitis pose specific challenges, and delayed or incorrect diagnosis can significantly worsen outcomes.AI is a promising new technology that has the potential to revolutionize the diagnosis and treatment of infectious keratitis.AI algorithms can be used to diagnose and identify the etiology of infectious keratitis with a high degree of accuracy, even in remote areas and in countries with limited resources.Other potential roles of AI include developing new treatments, monitoring the progression of the disease, and personalizing the treatment for each patient.As AI technology continues to develop, it is likely to play an increasingly important role in the fight to preserve eyesight against infectious keratitis.

Table 1 .
A brief summary of slit-lamp/external photography-based studies.

Table 2 .
A brief summary of confocal microscopy-based studies.